<%@page import="java.util.Date"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>处理页面</title>
</head>
<body>
	<%
		request.setCharacterEncoding("UTF-8");
		String user = URLEncoder.encode(request.getParameter("user"), "utf-8");
		Cookie cookie = new Cookie("myCookie", user + "#" + new Date().toLocaleString());
		cookie.setMaxAge(60*60);
		response.addCookie(cookie);
	%>
	<script type="text/javascript">
		window.location.href = "index.jsp";
	</script>
</body>
</html>